# eric7.Testing.Interfaces.UnittestExecutor

Module implementing the executor for the standard 'unittest' framework.

### Global Attributes

None

### Classes

UnittestExecutor | Class implementing the executor for the standard 'unittest' framework.

### Functions

None

## UnittestExecutor

Class implementing the executor for the standard 'unittest' framework.

### Derived from

TestExecutorBase

### Class Attributes

module
name
runner

### Class Methods

None

### Methods

UnittestExecutor | Constructor
__processData | Private slot to process the received data.
createArguments | Public method to create the arguments needed to start the test process.
discover | Public method to start the test discovery process.
finished | Public method handling the unit test process been finished.
getVersions | Public method to get the test framework version and version information of its installed plugins.
hasCoverage | Public method to check, if the collection of coverage data is available.
start | Public method to start the testing process.
startDebug | Public method to start the test run with debugger support.
supportsPatterns | Public method to indicate the support for test filtering using test name patterns or a test name pattern expression.

### Static Methods

None

#### UnittestExecutor (Constructor)

UnittestExecutor(testWidget)

Constructor

testWidget (TestingWidget)
  reference to the unit test widget

#### UnittestExecutor.__processData

__processData(data)

Private slot to process the received data.

data (dict)
  data object received

#### UnittestExecutor.createArguments

createArguments(config)

Public method to create the arguments needed to start the test process.

config (TestConfig)
  configuration for the test execution

Return:
  list of process arguments

Return Type:
  list of str

#### UnittestExecutor.discover

discover(config, pythonpath)

Public method to start the test discovery process.

config (TestConfig)
  configuration for the test discovery
pythonpath (list of str)
  list of directories to be added to the Python path

#### UnittestExecutor.finished

finished()

Public method handling the unit test process been finished.

This method should read the results (if necessary) and emit the signal testFinished.

#### UnittestExecutor.getVersions

getVersions(interpreter)

Public method to get the test framework version and version information of its installed plugins.

interpreter (str)
  interpreter to be used for the test

Return:
  dictionary containing the framework name and version and the list of available plugins with name and version each

Return Type:
  dict

#### UnittestExecutor.hasCoverage

hasCoverage(interpreter)

Public method to check, if the collection of coverage data is available.

interpreter (str)
  interpreter to be used for the test

Return:
  flag indicating the availability of coverage functionality

Return Type:
  bool

#### UnittestExecutor.start

start(config, pythonpath)

Public method to start the testing process.

config (TestConfig)
  configuration for the test execution
pythonpath (list of str)
  list of directories to be added to the Python path

#### UnittestExecutor.startDebug

startDebug(config, pythonpath, debugger)

Public method to start the test run with debugger support.

config (TestConfig)
  configuration for the test execution
pythonpath (list of str)
  list of directories to be added to the Python path
debugger (DebugUI)
  refference to the debugger interface

#### UnittestExecutor.supportsPatterns

supportsPatterns(_interpreter)

Public method to indicate the support for test filtering using test name patterns or a test name pattern expression.

_interpreter (str)
  interpreter to be used for the test (unused)

Return:
  flag indicating support of markers

Return Type:
  bool

Up